Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Google Chrome not recognizing DXL as XML during a jQuery AJAX request
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application Development
Platform: Windows
Release: 8.5.2
Reproducible: Always

Hoping to save someone else some time and effort with this post.

I was having a problem with a web application which I just converted to using jQuery. A request which had previously worked using a window.XMLHttpRequest method started failing only in Google Chrome. It was returning a 200 OK response but Chrome was sending it into the function I'd specified as the error handler for the request, and throwing the error "Cannot read property 'documentElement' of null". Debugging the code showed me it had decided it was a parse error, but wasn't giving me a pointer to the offending bit like I usually get, and running the response through validators was not giving me any errors.

The response it was getting from the server was a notes document converted to xml/dxl using NotesDXLExporter and NotesStream, outputted using Print |Content-Type:text/xml| & NotesStream.ReadText()

Eventually, I found that specifying dataType as 'text' and contentType as 'xml' in my ajax request would allow it to consider the request a success, but found the response was coming back as a string rather than an xml document. I can only assume that there's something in the dxl rendering of the document that Chrome doesn't like so it was treating it as text rather than xml.

The way I've gotten round it is to use the following:
var xmlstr = stringReturnedFromServer; //first parameter in success function
if (window.ActiveXObject) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = 'false';
xmlDoc.loadXML(xmlstr);
} else {
xmlDoc = (new DOMParser()).parseFromString(xmlstr, "text/xml");
}


For anyone that knows a lot more about this kind of thing than me and is interested in figuring out exactly why Chrome doesn't like dxl, the top of the server response looks like this:
<!DOCTYPE document SYSTEM 'xmlschemas/domino_8_5_2.dtd'>
<document xmlns='http://www.lotus.com/dxl' version='8.5' maintenanceversion='2.0'
replicaid='8025730000000000' form='DocumentOutputAsXML'>

Maybe there's something in there that Chrome doesn't like.

Emily


Feedback number WEBB8DNG3G created by ~Mario Rejipyzenader on 02/01/2011

Status: Open
Comments:

Google Chrome not recognizing DXL a... (~Mario Rejipyze... 1.Feb.11)
. . Not supported (~Sean Nimjumipl... 1.Feb.11)
. . Now IE not recognizing DXL as XML d... (~Mario Rejipyze... 3.Mar.11)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS